home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / -archivi / -recent2 / anim2mpegs.lha / Anim2mpegS / An2mp next >
Text File  |  1999-03-20  |  2KB  |  69 lines

  1. echo "c"
  2. copy c:copy t:copy
  3. t:copy c:delete t:del
  4. assign Split: Split
  5. Requestfile >env:ANIMname TITLE="Choose anim to convert"
  6. if warn
  7.    echo >env:msg "Operation canceled....!"
  8.    skip end
  9. endif
  10. if not exists $ANIMname
  11.    echo >env:msg "File does not exist....!"
  12.    skip end
  13. endif
  14. Requestfile >env:ANIMdest TITLE="Choose destination path."
  15. if warn
  16.    echo >env:msg "Operation canceled....!"
  17.    skip end
  18. endif
  19. Requestchoice >env:mode "" "Do you want scaling ?" Yes No
  20. t:copy c:eval t:ev
  21. if $mode eq 1
  22.    SmartScale ask $ANIMname
  23.    if val $xout GT 352
  24.       t:ev >env:xout2 $xout/2 
  25.       echo >env:xout $xout2
  26.    endif
  27.    if val $yout GT 256
  28.       t:ev >env:yout2 $yout/2 
  29.       echo >env:yout $yout2
  30.    endif
  31.    t:ev >env:xout2 ($xout/16)*16 
  32.    t:ev >env:yout2 ($yout/16)*16
  33.    echo >env:xout $xout2
  34.    echo >env:yout $yout2
  35. else
  36.    SmartScale env $ANIMname
  37.    t:ev >env:xout ($xin/16)*16 
  38.    t:ev >env:yout ($yin/16)*16
  39.    if val $xin not eq $xout
  40.       echo >env:mode 1
  41.    endif
  42.    if val $yin not eq $yout
  43.       echo >env:mode 1
  44.    endif
  45. endif
  46. echo "MP scale is $xout x $yout*N"
  47. t:del >nil: split:#? env:V env:V2 env:#?out2
  48. buildanim $ANIMname Split: SPLIT VERBOSE
  49. echo "*N Animation successfully split.*N*N"
  50.  
  51.  
  52. t:copy convertMPimage t:cmi
  53. T:copy ppmtoyuvsplit t:yuv
  54. T:copy c:move t:mv
  55. if $mode eq 1
  56.    list >t:ConPics sort name split: lformat "t:ev >env:V2 $V+1*Necho >env:V $V2*Nt:mv >nil: %s%s t:iff*Nt:CMI noprogress format ppm x $XOUT y $YOUT t:iff to t:ppm*Nt:yuv t:PIC$V t:ppm*Nt:mv >nil: t:pic#? split:*Necho  %s"
  57. else
  58.    list >t:ConPics sort name split: lformat "t:ev >env:V2 $V+1*Necho >env:V $V2*Nt:mv >nil: %s%s t:iff*Nt:CMI noprogress format ppm t:iff to t:ppm*Nt:yuv t:PIC$V t:ppm*Nt:mv >nil: t:pic#? split:*Necho  %s"
  59. endif
  60. execute t:conpics
  61. t:del >nil: t:cmi t:conpics t:ppm t:iff t:ev t:yuv t:mv env:mode env:V2
  62. mpeg -h $xout -v $yout -a 0 -b $V split:pic -s $ANIMdest
  63. echo >env:msg " Mpeg animation complete."
  64. lab end
  65. t:del >nil: split:#? env:ANIMname env:ANIMdest t:copy env:V 
  66. Requestchoice >nil: "" "$msg" OK
  67. t:del >nil: env:msg env:xin env:yin env:xout env:yout env:xinh env:din t:del
  68. endcli
  69.